package com.hdoit.kylin.web.groupActivity.modelconfig;

import com.hdoit.kylin.web.groupActivity.provider.DeleteMarkProvider;
import com.hdoit.kylin.web.groupActivity.provider.StatusProvider;
import com.tennetcn.component.attribute.DateTimeAttribute;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      zhangyang
 * @email       
 * @createtime  2017年08月01日 17:20:34
 * @comment
 */
public class IntraGroupActivityConfig extends ModelMetadataAttributeConfiguration{
    public IntraGroupActivityConfig(){
        this.setProperty("acticityComment")
            .hasAttribute(new DisplayNameAttribute("活动内容"));

        this.setProperty("activityName")
            .hasAttribute(new DisplayNameAttribute("活动名称"))
            .hasAttribute(new RequiredAttribute("活动名称为必填项"));

        this.setProperty("fileAddress") 	
            .hasAttribute(new DisplayNameAttribute("文件地址"));

        this.setProperty("deletemark")
            .hasAttribute(new DisplayNameAttribute("活动类别"))
            .hasAttribute(new RequiredAttribute("标志是否是会议"))
            .hasAttribute(new DropDownListAttribute(new DeleteMarkProvider()));
            
        this.setProperty("activityDate")
            .hasAttribute(new DisplayNameAttribute("活动时间"))
            .hasAttribute(new DateTimeAttribute());

        this.setProperty("status")
            .hasAttribute(new DisplayNameAttribute("活动权限"))
            .hasAttribute(new RequiredAttribute("是否展示项"))
            .hasAttribute(new DropDownListAttribute(new StatusProvider()));
        
        this.setProperty("participants")
            .hasAttribute(new DisplayNameAttribute("参与活动人员"))
            .hasAttribute(new RequiredAttribute("参与活动人员为必填项"));

        this.setProperty("personInCharge")
            .hasAttribute(new DisplayNameAttribute("负责人"))
            .hasAttribute(new RequiredAttribute("负责人为必填项"));

    }
}
